Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a timeout #8

Merged
merged 1 commit into from
Dec 12, 2024
Merged

Add a timeout #8

merged 1 commit into from
Dec 12, 2024

Conversation

helje5
Copy link
Contributor

@helje5 helje5 commented Dec 12, 2024

Without the timeout the request expires immediately and results in the HTTPClientError.deadlineExceeded.

I'm not sure why the async methods of AsyncHTTPClient don't allow a nil deadline like other methods (to use the overall client default).

This patch makes it work, but maybe there should be a more general way to configure the timeout.

Without the timeout the request expires immediately and results in the `HTTPClientError.deadlineExceeded`.

I'm not sure why the async methods of AsyncHTTPClient don't allow a `nil` deadline like other methods (to use the overall client default).

This patch makes it work, but maybe there should be a more general way to configure the timeout.
Copy link
Member

@dimitribouniol dimitribouniol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this! (probably not the first bug introduced from copy pasting everything from a working implementation into a package without deploying it somewhere first 🙈)

I'll likely make this configurable with other proxy settings at the init site, but 2s is as good as anything at this point in time.

@dimitribouniol dimitribouniol enabled auto-merge (squash) December 12, 2024 18:40
@dimitribouniol dimitribouniol merged commit 430cb59 into mochidev:main Dec 12, 2024
3 checks passed
@helje5 helje5 deleted the patch-1 branch December 12, 2024 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants